# cmake_minimum_required (VERSION 2.6)

# project (sdl-layer-demos)

# include(FindSDL)
include(FindSDL_image)

include_directories (${SDLIMAGE_INCLUDE_DIR})
link_directories(${PROJECT_BINARY_DIR})

set (DEMO_DIR ${PROJECT_SOURCE_DIR}/demos)

add_executable (
  scroll
  WIN32
  ${DEMO_DIR}/scroll.c
)

add_executable (
  snow
  WIN32
  ${DEMO_DIR}/snow.c
)


target_link_libraries (scroll ${SDLIMAGE_LIBRARY})
target_link_libraries (snow ${SDLIMAGE_LIBRARY})
target_link_libraries (scroll ${SDLAYER_LIBRARY_STATIC})
target_link_libraries (snow ${SDLAYER_LIBRARY_STATIC})

# Copy resource files into the binary directory
file(GLOB COPY_FILES ${DEMO_DIR}/*.jpg ${DEMO_DIR}/*.png)

foreach(FILENAME ${COPY_FILES})
  file(COPY ${FILENAME} DESTINATION ${PROJECT_BINARY_DIR}/demos)
endforeach(FILENAME)

